<?php
$data = $db->fetch_first("
    SELECT `al`.*,`ac`.`content` FROM `article_list` `al`
    LEFT JOIN `article_content` `ac` ON `ac`.`art_id`=`al`.`id` AND `ac`.`status`='LATEST'
    WHERE `al`.`id`='".intval($article_id)."'
    ");
$cat_id_array = explode(',',$data['cat_ids']);
$cat_name_array = array();
foreach($cat_id_array as $v){
    $cat_name_array[$v] = $category_list[$v]['name'];
}
?>
